<div appBsModal #createModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #editionForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h5 class="modal-title">
                        <span>{{"CreateNewEdition" | localize}}</span>
                    </h5>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <i aria-hidden="true"  class="bi bi-x"></i>
                    </button>
                </div>
                <div class="modal-body">
                    <tabset>
                        <tab heading="{{'EditionProperties' | localize}}" class="p-5">
                            <div class="form-group">
                                <label for="EditionDisplayName">{{"EditionName" | localize}} *</label>
                                <input id="EditionDisplayName" #editionNameInput="ngModel" class="form-control"
                                    type="text" name="EditionDisplayName" [(ngModel)]="edition.edition.displayName"
                                    required maxlength="64">
                                <validation-messages [formCtrl]="editionNameInput"></validation-messages>
                            </div>
                        </tab>
                        <tab heading="{{'Features' | localize}}" class="p-5">
                            <feature-tree #featureTree></feature-tree>
                        </tab>
                    </tabset>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-light-primary font-weight-bold"
                        (click)="close()">{{"Cancel" | localize}}</button>
                    <button type="submit" class="btn btn-primary font-weight-bold" [disabled]="!editionForm.form.valid"
                        [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i>
                        <span>{{"Save" | localize}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>
